<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="com.nce.util.LoginUserUtil"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>报表</title>
		<link href="${ctx}/css/jehoo.css" rel="stylesheet" type="text/css" />
		<link href="${ctx}/css/colorbox.css" rel="stylesheet" type="text/css" />
		<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
		<script src="${ctx}/js/jquery.form.js" type="text/javascript"></script>
		<script src="${ctx}/js/jquery.colorbox.js" type="text/javascript"></script>
		<script src="${ctx}/js/table.js" type="text/javascript"></script>
		<link type="text/css" href="${ctx}/css/ui.all.css" rel="stylesheet" />
	<script type="text/javascript" src="${ctx}/js/ui.core.js"></script>
	<script type="text/javascript" src="${ctx}/js/ui.datepicker.js"></script>
	<script type="text/javascript" src="${ctx}/js/ui.datepicker-zh_CN.js"></script>
	
		<script>
		
		function datePicker(pickerName,locale) {
			$(pickerName).datepicker($.datepicker.regional[locale]);
			$(pickerName).datepicker('option', 'changeMonth', true);//月份可调
			$(pickerName).datepicker('option', 'changeYear', true);//年份可调
		}
	
		$(document).ready(function() {
			$("#gen_report_form").ajaxForm(function() { 
        			$("#show_msg").text("报表生成成功");
		   	   		
     		}); 
			
            
			datePicker('#sdate','zh_CN');
			datePicker('#edate','zh_CN');
			
		    $("#gen_report_btn").click(function() {//start
		    
		    	if ($('#sdate').val() == ''|| $('#edate').val() == '') {
				
			      alert('日期不能为空')
				  return false;
	        	}
		   	    $("#gen_report_form").submit();
		   	    $("#gen_report_btn").hide();
		   	     $("#show_msg").text("报表生成中...");
				return false;
			});	 //end 
	  		
		});
</script>
	</head>
	<body>
		<div id="body" align="center">	
		<s:iterator status="spin" value="reportPage.result">	
		<div class="report_table">
		<table  cellpadding="0" cellspacing="0">		
		<tr><td>开始日期:</td><td><s:date name="sdate" format="yyyy-MM-dd" /></td><td>结束日期:</td><td><s:date name="edate" format="yyyy-MM-dd" /></td>
		<s:if test='content=="news"'><td>内容类型:</td><td>新闻</td></s:if>
		<s:if test='content=="bbsblog"'><td>内容类型:</td><td>论坛</td></s:if>
		<s:if test='content=="mblog"'><td>内容类型:</td><td>微博</td></s:if>
		<s:if test='content=="basenews"'><td>内容类型:</td><td>全部</td></s:if>
		<s:if test='type=="content"'><td>类型:</td><td>按内容搜索</td></s:if>
		<s:if test='type=="title"'><td>类型:</td><td>按标题搜索</td></s:if>
		</tr>	
		<tr><td>生成时间:</td><td><s:date name="cdate" format="yyyy-MM-dd HH:mm:ss" /></td><td>搜索词:</td><td>${words}</td><td></td><td></td><td></td><td><a class="export_btn" target="_blank" href="${ctx}/${file}">下载报表</a></td></tr>	
		
		</table>
		</div>	
		</s:iterator>
		</div>
	</body>
</html>